package org.github.manx98.jlibhac.tools.fs;

/**
 * @author Manx98
 * @version 1.0
 * @since 2022/10/3 1:41
 */
public enum GameCardSizeInternal {
    Size1Gb("1GB"),
    Size2Gb("2GB"),
    Size4Gb("4GB"),
    Size8Gb("8GB"),
    Size16Gb("16GB"),
    Size32Gb("32GB");

    private final String name;

    GameCardSizeInternal(String name) {
        this.name = name;
    }

    @Override
    public String toString() {
        return name;
    }

    public static GameCardSizeInternal valueOf(int value) {
        switch (value) {
            case 0xFA:
                return Size1Gb;
            case 0xF8:
                return Size2Gb;
            case 0xF0:
                return Size4Gb;
            case 0xE0:
                return Size8Gb;
            case 0xE1:
                return Size16Gb;
            case 0xE2:
                return Size32Gb;
        }
        return null;
    }
}
